Option Public
Sub Initialize
	Const VIEW_NAME_OF_ALL = "All"
	
	Dim session As New Notessession
	Dim dbCurrent As NotesDatabase
	Dim collection As NotesDocumentCollection
	Dim doc As NotesDocument
	Set dbCurrent = session.CurrentDatabase

	Dim view As NotesView
	Dim vc As NotesViewEntryCollection

	Set view = dbCurrent.GetView(VIEW_NAME_OF_ALL)
	If view Is Nothing Then
		Set view = dbcurrent.Createview(VIEW_NAME_OF_ALL)
	End If
	
	view.AutoUpdate = False
	Set vc = view.Allentries
	vc.Removeall(true)

	Call dbCurrent.Compact()
End Sub